<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-appVersion-edit" th:object="${appVersion}">
        <input id="id" name="id" th:field="*{id}" type="hidden">

        <div class="form-group">
            <label class="col-sm-3 control-label">产品名称：</label>
            <div class="col-sm-8">
                <div class="radio-box" th:each="dict : ${@dict.getType('sys_project_name')}">
                    <input type="radio" th:id="${dict.dictCode}" name="productName" th:value="${dict.dictValue}" th:field="*{productName}">
                    <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">系统【IOS/Android】：</label>
            <div class="col-sm-8">
                <div class="radio-box" th:each="dict : ${@dict.getType('system_type')}">
                    <input type="radio" th:id="${dict.dictCode}" name="systemType" th:value="${dict.dictValue}" th:field="*{systemType}">
                    <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">状态：</label>
            <div class="col-sm-8">
                <div class="radio-box" th:each="dict : ${@dict.getType('sys_status')}">
                    <input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
                    <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
                </div>
            </div>
        </div>




<div class="form-group">
    <label class="col-sm-3 control-label">版本号：</label>
    <div class="col-sm-8">
        <input id="versionNo" name="versionNo" class="form-control" type="text" th:field="*{versionNo}">
    </div>
</div>
<div class="form-group">
    <label class="col-sm-3 control-label">程序描述：</label>
    <div class="col-sm-8">
        <textarea id="programDescription" name="programDescription" class="form-control">[[*{programDescription}]]</textarea>
    </div>
</div>
</form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "system/appVersion"
    $("#form-appVersion-edit").validate({
        rules: {
            productName: {
                required: true,
            },
            systemType: {
                required: true,
            },
            status: {
                required: true,
            },
            versionNo: {
                required: true,
            },

        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-appVersion-edit').serialize());
        }
    }
</script>
</body>
</html>
